/*
Name: Kabir Kang
File: cardtest2.c
Date: 7/13/14
Summary: Tests the salvage card by checking buys, coins, and discards.
 */
#include "dominion.h"
#include "dominion_helpers.h"
#include "rngs.h"
#include <string.h>
#include <stdio.h>

int main(int argc, char * argv[])
{
  int seed = 100;
  int numPlayers = 2;
  int preBuys = 0;
  int preCoins = 0;
  int prePlayedCards = 0;

  int k[10] = {adventurer, council_room, feast, gardens, mine, remodel, smithy, village, baron, great_hall};

  struct gameState g;
  initializeGame(numPlayers, k, seed, &g);

  preBuys = g.numBuys;
  preCoins = g.coins;
  prePlayedCards = g.playedCardCount;
  g.hand[0][2] = province;

  cardEffect(salvager, 2, 0, 0, &g, 1, 0);
  if (g.numBuys == 2)
	printf("salvager: PASS when buys are added. \n");
  else
    printf("salvager: FAIL when buys are added incorrectly. \n");
  if (g.coins == preCoins + 8)
	printf("salvager: PASS coins added.\n");
  else
    printf("salvager: FAIL coins added incorrectly.\n");

  if (g.playedCardCount == prePlayedCards + 1)
	printf("salvager: PASS when card discarded correctly.\n");
  else
    printf("salvager: FAIL when card discarded incorrectly.\n");

  return 0;
}
